package com.lin.mr.maizilaundry.myadapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * 用于ClothActivity,PayActivity
 */
public class ClothAdapter extends FragmentPagerAdapter{
    private List<Fragment> fragmentList;
    public ClothAdapter(FragmentManager fm, List<Fragment> fragmentList) {
        super(fm);
        //接收ClothActivity发送过来的fragmentList
        this.fragmentList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }
}
